--[[/**
-- * 
 * 西泽 血量减少后触发
 *
-- */]]

---@class BuffEffect615204 : BaseBuffEffect
BuffEffect615204 = ClientFight.CreateClass("BuffEffect615204", ClientFight.BaseBuffEffect)
local t = BuffEffect615204

---@param fight Fight
---@param buff FighterBuff
function t:action(fight, buff, ...)

    local parameters = {...};
    local damage = parameters[1];
    local damageShare = Utils.calcRatio(damage, buff.buffBean.f_BuffEffectValue[1]);
    if (damageShare < 1) then
        return ClientFight.BaseBuffEffect.action(self, fight, buff, ...);
    end
    local source = buff.source;

    SkillRoleMgr.savePathFile("[" .. fight.frame .. "][EFFECT]Fighter " .. buff.target.fighterId .. " Buff:"
            .. buff.modelId .. " 受伤时, 给我标记的那个人也受到伤害：" .. damageShare);
    local realDamage = DamageManager.setFighterHp(fight, source, buff.target, nil, DamageResultTypeEnum.NORMAL, -damageShare, source.hp - damageShare
    , true, true, true);
    return ClientFight.BaseBuffEffect.action(self, fight, buff, ...);
end

t.New()